package com.ruoyi.sso.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.sso.domain.SystemSsoWyUrl;
import com.ruoyi.sso.mapper.SystemSsoWyUrlMapper;
import com.ruoyi.sso.service.ISystemSsoWyUrlService;

/**
 * 转发地址Service业务层处理
 * 
 * @author zsj
 * @date 2020-01-07
 */
@Service
public class SystemSsoWyUrlServiceImpl implements ISystemSsoWyUrlService 
{
    @Autowired
    private SystemSsoWyUrlMapper SystemSsoWyUrlMapper;

    /**
     * 查询转发地址
     * 
     * @param id 转发地址ID
     * @return 转发地址
     */
    @Override
    public SystemSsoWyUrl selectSystemSsoWyUrlById(Long id)
    {
        return SystemSsoWyUrlMapper.selectSsoWyUrlById(id);
    }

    /**
     * 查询转发地址列表
     * 
     * @param SystemSsoWyUrl 转发地址
     * @return 转发地址
     */
    @Override
    public List<SystemSsoWyUrl> selectSystemSsoWyUrlList(SystemSsoWyUrl SystemSsoWyUrl)
    {
        return SystemSsoWyUrlMapper.selectSsoWyUrlList(SystemSsoWyUrl);
    }

    /**
     * 新增转发地址
     * 
     * @param SystemSsoWyUrl 转发地址
     * @return 结果
     */
    @Override
    public int insertSystemSsoWyUrl(SystemSsoWyUrl SystemSsoWyUrl)
    {
        SystemSsoWyUrl.setCreateTime(DateUtils.getNowDate());
        return SystemSsoWyUrlMapper.insertSsoWyUrl(SystemSsoWyUrl);
    }

    /**
     * 修改转发地址
     * 
     * @param SystemSsoWyUrl 转发地址
     * @return 结果
     */
    @Override
    public int updateSystemSsoWyUrl(SystemSsoWyUrl SystemSsoWyUrl)
    {
        SystemSsoWyUrl.setUpdateTime(DateUtils.getNowDate());
        return SystemSsoWyUrlMapper.updateSsoWyUrl(SystemSsoWyUrl);
    }

    /**
     * 删除转发地址对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSystemSsoWyUrlByIds(String ids)
    {
        return SystemSsoWyUrlMapper.deleteSsoWyUrlByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除转发地址信息
     * 
     * @param id 转发地址ID
     * @return 结果
     */
    @Override
    public int deleteSystemSsoWyUrlById(Long id)
    {
        return SystemSsoWyUrlMapper.deleteSsoWyUrlById(id);
    }
}
